<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>ListMenu</title>    
    <style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		background-color: #EEF2FB;
	}
	-->
	</style>
	<link href="css/skin.css" rel="stylesheet" type="text/css" />
  </head>  
  <body>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td>
			 <table width="100%" border="0" cellpadding="0" cellspacing="0">
			 	<tr>
			 		<td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
				    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
				      <tr>
				        <td height="31"><div id="title" class="titlebt">Add Menu</div></td>
				      </tr>
				    </table></td>
				    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
			 	</tr>
			 </table>
			</td>    
		</tr>
		<tr>
			<td >
  <table width="100%" height="116" border="0" cellpadding="0" cellspacing="0" >  
  <tr>
  <td width="17" background="images/mail_leftbg.gif"><img src="images/mail_leftbg.gif" width="17" height="17" /></td>
  <td>
  <table>
 <th></th> <th>name</th><th>path</th><th>authority</th><th>isRoot</th><th>group</th><th>sequence</th><th>Operator</th>
  <s:iterator value="menus">
	<tr>
	<td>
	<input id="<s:property value="id" />" type="CheckBox">
	</td>
	<td align="center">
		<s:property value="name" /> 
		</td>
		<td align="center">
		<s:property value="path" />
		</td>
		<td align="center">
		<s:property value="authority.authority" />
		</td>
		<td align="center">
		 <s:if test="isRoot==1">
        Yes
       </s:if>
       <s:else>
       No
       </s:else>
		</td>
		<td align="center">
		<s:property value="groups.groups" />
		</td>
		<td align="center">
		<s:property value="sequence" />
		</td>
		<td align="center">
		
		<s:url id="edit" action="editMenu.action">
		<s:param name="id"><s:property value="id" /></s:param>
		</s:url>
		<a href="./menu/deleteMenu.action?id=<s:property value="id" />" onClick="if(confirm('are you sure to delete this record？')) return true;else return false;">delete</a>&nbsp;&nbsp;<s:a href="%{edit}">edit</s:a>
		</td>
		
	</tr>
</s:iterator>
</table>
</td><td width="16" background="images/mail_rightbg.gif"><img src="images/mail_rightbg.gif" width="16" height="17" /></td></tr>
</table>
</td>
		</tr>
		<tr>
			<td>
			 <table width="100%" border="0" cellpadding="0" cellspacing="0">
			 	<tr>
			 		<td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
				    <td valign="top" background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
				    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
			 	</tr>
			 </table>
			</td>    
		</tr>
	</table>
  </body>
</html>
